<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Successful</title>

    <!— Bootstrap —>
    <link rel="stylesheet" href="css/style.css" type="text/css">
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!— HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries —>
    <!— WARNING: Respond.js doesn't work if you view the page via file:// —>
    <!--[if lt IE 9]>
    <![endif]-->
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Student Registration</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<br>
<?php
global $code;
global $message;
if (isset($_GET['code'])) {
    $code = $_GET['code'];
    if ($code != 0) {
        $message = $_GET['message'];
    }
}
?>
<div class="container">
    <div class="panel panel-default">
        <div class="panel-heading">
            <div class="row">
                <div class="col-lg-6">
                    <h2>Successful</h2>
                </div>
            </div>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-sm-3">
                    <a role="button" href="index.html" class="btn btn-info">Back to Main Page</a>
                </div>
            </div>
            <br>

            <div class="row">
                <div class="col-lg-3"></div>
                <div class="col-lg-6">
                    <?php
                    if ($code == 0) {
                        echo '<h1 style="color: green;margin-left: 20px;">Successfully Completed ! </h1>';
                        echo '<h2 style="color: green">You\'ve been registered at our site!</h2><img src="images/suc.png" style="margin-left:100px;">';
                    } else {
                        echo '<h1 style="color: red;margin-left: 20px;">Warning!You have error! </h1>';
                        echo '<h2 style="color: red">Error code: ' . $message . '</h2><img src="images/fail.png" style="margin-left:100px;">';
                    }
                    ?>
                </div>
                <div class="col-lg-3"></div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="js/jquery-1.10.2.js"></script>
<script src="js/bootstrap.js"></script>
</html>

